package pokerTests;

import exception.InvalidCardEx;
import junit.framework.TestCase;
import poker.*;

public class DeckTest extends TestCase {
	Deck d;
	
	protected void setUp() throws Exception {
		d = new Deck();
		super.setUp();
	}
	
	public void testDeck() throws Exception {
		try {
			for(int i=0; i<52; i++) {
				int j = (int)d.takeCard();
				assertTrue(j > -1 && j < 52);
			}
		}
		catch(InvalidCardEx e) { fail("Za mało kart w talii."); }
	}
}
